home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
- KBFIX2.COM VERSION 3.0 June 22, 1986
-
-
- Copyright (C) 1985, 1986
- Skip Gilbrech
-
- ----------------------------------------------
- This program is intended for public-domain use
- It must not be sold under any condition
- ----------------------------------------------
-
- INTRODUCTION
-
- KBFIX2.COM is a resident program for the IBM PC, AT, and
- compatibles which contains several keyboard enhancements which I
- and many others have found extremely useful. Most of these
- enhancements can be found in one or another public-domain or
- commercial program, but they tend to be grouped together with
- other features which you may or may not want, and which often
- can't be shut off. KBFIX2 was written to be as compatible as
- possible with other programs, and as flexible as possible in
- terms of options: all its features can be enabled or disabled at
- any time from the dos command line.
-
- Version 3.0 contains several enhancements and bug fixes to the
- last released version (2.3). Many of the changes were suggested
- by users of the program. I apologize for not replying personally
- to each suggestion, but everyone who wrote me, and whose address
- I can find, will receive a copy of this update.
-
- Changes which affect command line parameters or program use are
- marked in the left margin with '|'. See the end of this document
- for a change summary.
-
- USING THE PROGRAM
-
- KBFIX2 can be invoked from the command line or from within a
- batch file. The first time the program is invoked it loads
- itself into memory (takes up about 2-1/2 K); it will then remain
- resident until the system is rebooted, or until it is removed
- from memory with the /K option. The current configuration of
- KBFIX2 is selected by means of the command line options outlined
- below, any or all of which can be changed at any time. When the
- program starts up, it tries to find its loaded image in memory;
- if the image is found, all options currently in effect are copied
- to a local buffer where they are used as defaults, and all
- changes will be made to the memory-resident image. KBFIX2 will
- never knowingly load more than one copy of itself into memory, so
- if you ever see the 'Initial Installation' message after KBFIX2
- has once been loaded, please reboot and let me know about it.
-
-
-
- -- 1 --
-
-
-
-
-
- KBFIX2.COM VERSION 3.0 June 22, 1986
-
-
- Options can be entered separately or in groups. Each option or
- group must be preceded by '-' or '/', and must be separated from
- other groups by at least one space or tab. There must be no
- spaces within groups. To enable or disable an 'on/off' option,
- follow the letter(s) with 1 or 0.
-
- OPTION DEFAULT
- ------ -------
-
- KB -- use extended Keyboard Buffer Enabled
-
- Enabling this option activates the 127-character keyboard buffer.
- It also allows KBFIX2 to check for the special characters Ctrl-C,
- Ctrl-S, and Ctrl-P, which are normally only recognized by DOS if
- they appear at the beginning of the keyboard buffer. If any one
- of these characters is typed while KBFIX2's buffer is active, the
- buffer will be cleared, and the character typed will be placed at
- its head.
-
- KT -- adjust Typematic action of Keys Disabled
-
- Enabling this option allows adjusting the speed of typematic key
- repeating; disabling it returns typematic action to normal. The
- options below that start with 'KT' will retain their settings
- even if typematic is disabled, so it's not necessary to reenter
- them if it becomes necessary to shut off typematic temporarily.
-
- KTD -- Ticks to Delay before starting (0-99) 6
-
- Sets the number of timer ticks which will occur before typematic
- repeating begins. Timer ticks happen approximately once every
- 1/18th second, so if this number is larger than about 9, the only
- effect it will have is a speedup of the typematic rate of an
- already repeating key, since normal typematic action seems to
- start (on an IBM-PC, at least) about one-half second after the
- key is first pressed. Personally I find a setting of 5 or 6
- about right.
-
- KTR -- Ticks between key Repeats (0-99) 0
-
- Sets the number of timer ticks which will occur between repeats
- of the currently-pressed key. Setting this option to zero
- results in 18 repeats per second. These repeats are in addition
- to the normal typematic repeats produced by the keyboard, so the
- effective rate of repeating will be considerably higher than the
- setting of this option would otherwise indicate.
-
-
-
-
- -- 2 --
-
-
-
-
-
- KBFIX2.COM VERSION 3.0 June 22, 1986
-
-
- OPTION DEFAULT
- ------ -------
-
- KTN -- Num. chars. inserted each repeat (1-10) 1
-
- Determines how many copies of the currently repeating keycode to
- place into the keyboard buffer each time the key is repeated.
- Fine tuning of the effective typematic rate is possible by
- experimenting with various combinations of this setting and the
- KTR setting above.
-
- F -- Fix caps-lock reverse character shift Always
-
- Tells KBFIX2 whether or not to fix the annoying 'reverse-shift'
- which occurs when caps-lock is on and a shift key is pressed.
- When I have caps-lock on, it's generally because I want capital
- letters to appear on the screen, and that's what will happen when
- this option is enabled.
-
- | This option has changed in Version 3.0. The default setting
- | (nothing entered on the command line) will act as before, but
- | following the 'F' with '1' causes caps-lock to act more like
- | caps-lock on a typewriter: The first time a shift key is pressed
- | along with any alphabetic character when caps-lock is on, the
- | alphabetic character will be capitalized. Caps-lock will then be
- | turned off. This feature is easier to try than to describe, and
- | if you don't like it, either enter nothing for this option or
- | follow the 'F' with '2', and the reverse-shift-fix will act as it
- | always has.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -- 3 --
-
-
-
-
-
- KBFIX2.COM VERSION 3.0 June 22, 1986
-
-
- OPTION DEFAULT
- ------ -------
-
- D -- Display state of locking keys Enabled
-
- Enabling this option results in an on-screen display of the state
- of the caps-lock, num-lock, and scroll-lock toggles.
-
- | This display has changed somewhat in Version 3.0: The lock flags
- | are now shown by printing the appropriate character (C, N, or S)
- | with an attribute constructed by reversing the foreground and
- | background attributes of whatever is currently displayed on the
- | screen. In addition, the current character is saved and replaced
- | if possible when the locking key is toggled off. Previously, a
- | blanking character was always inserted when a key was not
- | toggled; now, the screen is not disturbed at all. These changes
- | result in less disturbance to screen displays, particularly if
- | color is being used, and reduce the system overhead slightly if
- | the timer update option is in effect. It is possible for the
- | algorithm used to become confused under certain circumstances,
- | but the condition will generally correct itself when the screen
- | is changed in a different program, etc. Display of locking flags
- | is now disabled during graphics mode operations.
-
- C -- starting Column for display (0-77) 77
-
- Sets the starting screen column for the 3-character flag display.
-
- R -- Row for display (0-24) 0
-
- Sets the row for the flag display. If the row setting is other
- than 0, the flags will 'clone' themselves whenever the screen is
- scrolled.
-
- | W -- Wait for Retrace on color display Enabled
-
- | Disable this option if you have a color card (EGA, etc.) that
- | doesn't produce 'snow' on the monitor. Those using a standard
- | IBM color graphics board should leave the option enabled.
-
-
-
-
-
-
-
-
-
-
-
- -- 4 --
-
-
-
-
-
- KBFIX2.COM VERSION 3.0 June 22, 1986
-
-
- OPTION DEFAULT
- ------ -------
-
- T -- use Timer interrupt to update display Disabled
-
- Enabling this option tells KBFIX2 to update the flag display 18
- times per second by using the timer interrupt; disabling it means
- the flags will only be updated whenever a key is pressed. Use of
- this feature allows the flags to be seen in programs which would
- otherwise overwrite them between key presses, but it also slows
- down the entire system slightly due to the overhead involved in
- writing to the screen. The slow-down seems to be less than one
- percent, though, even when using a color monitor. This option
- has no effect unless the D option above is also enabled.
-
- B -- Beep when locking keys are toggled Enabled
-
- Determines whether the bell will sound whenever the state of one
- of the toggling keys changes. If this option is enabled, the
- machine will beep from low to high whenever a toggle changes from
- off to on, and from high to low whenever a toggle changes from on
- to off.
-
- | In Version 3.0, you can follow the 'B' with a ratio (n:n) to
- | control the pitch of the beeps. This is useful when running
- | KBFIX2 on faster machines like the AT, etc. Entering B2:3, for
- | example, results in a pitch which is 2/3 of normal, which should
- | sound about right on an AT. Numbers from 1 to 9 can be used; if
- | the second value is missing, it is assumed to be '1'.
-
- S -- Scroll lock pause control Disabled
-
- Enabling this option will make KBFIX2 enter a loop whenever the
- scroll-lock key is pressed. The loop will cause screen output,
- and any other non interrupt-driven activity, to pause until the
- next time scroll-lock is pressed (either by itself, or at the
- same time as shift key). The scroll-lock key can always be used
- normally (to shift the scroll-state) by holding a shift key
- (Right/Left Shift or Alt) down at the same time. If the D option
- is enabled, a blinking S will be displayed while the pause is in
- effect.
-
- | In Version 3.0, the blinking 'S' is displayed to the left of the
- | other lock flags to avoid confusion with the normal scroll-lock
- | flag.
-
-
-
-
-
- -- 5 --
-
-
-
-
-
- KBFIX2.COM VERSION 3.0 June 22, 1986
-
-
- OPTION DEFAULT
- ------ -------
-
- V -- Verbose display of current settings Enabled
-
- Disabling this option prevents KBFIX2 from presenting its normal
- display of current settings. To have any effect, this option
- must be specified each time KBFIX2 is invoked.
-
- | K -- Kill KBFIX2 (remove from memory)
-
- | Entering /K on the command line causes KBFIX2 to remove itself
- | from memory if possible. This command should be used carefully
- | since it can result in memory 'holes' if KBFIX2 isn't the last
- | resident program installed. If KBFIX2's interrupt vectors have
- | been modified by another program, this command will fail, since
- | removing the program from memory in such a situation is almost
- | certain to lead to a system crash.
-
- -----------------------------------------------------------
-
- Command Line Example:
-
- KBFIX2 /F0 /KT1 /KTD5 /D1 /T1 /C50 /R0 /B0 /V0
-
- disables the caps-lock fix, enables typematic adjustment, sets
- the typematic delay (before starting to repeat a pressed key) to
- 5 ticks (5/18ths of a second), enables the key-state display and
- timer update, sets the display column and row to 50/0, disables
- toggle beeps, and tells KBFIX2 not to display its current
- settings.
-
- To avoid having to remember all this, enter your normal para-
- meters in AUTOEXEC.BAT or in some other convenient batch file.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -- 6 --
-
-
-
-
-
- KBFIX2.COM VERSION 3.0 June 22, 1986
-
- HARDWARE COMPATIBILITY
-
- KBFIX2 should run on any IBM-PC, XT, or AT, and on most close
- compatibles. Following are some of the assumptions it makes
- about the hardware:
-
- 1) The screen memory starts at B000H (monochrome), and B800H
- (color); screen-related bios data locations are identical to
- those on the IBM-PC.
-
- 2) The keyboard buffer starts at 40:1E and is organized like the
- standard IBM-PC buffer.
-
- 3) The base port address of the 8259 interrupt controller is 20H;
- the timer interrupt is on IRQ0, set up as interrupt 8;
- the keyboard interrupt is on IRQ1 and is interrupt 9.
-
- 4) The base keyboard port address is 60H.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -- 7 --
-
-
-
-
-
- KBFIX2.COM VERSION 3.0 June 22, 1986
-
-
- SOFTWARE COMPATIBILITY
-
- No program that deals with the hardware and system software on
- this level can hope to be compatible with everything else.
- KBFIX2 appears to work perfectly well with Sidekick, Dosedit,
- Prokey, Util (which places characters directly in the buffer),
- and every other program I've tried so far. It also works well
- with Fansi-Console (replacement for Ansi.sys) if KBFIX2's buffer
- option is disabled, since Fansi provides its own enlarged
- keyboard buffer.
-
- I can offer, however, absolutely no guarantees. I would like to
- be informed, though, at the address below, of any incompatibil-
- ities found, so I can try to determine whether the incompatibil-
- ity results from a problem within KBFIX2. Before you decide that
- KBFIX2 is incompatible with something, by the way, try varying
- loading order, removing other resident programs, changing op-
- tions, etc. I've tried to give KBFIX2 as 'low a profile' as
- possible. What I mean by that is that the interrupt handlers in
- KBFIX2 always pass control to whatever was there before, without
- changing the machine state at all. That feature is useful,
- though, only when KBFIX2 is loaded last in the chain of interrupt
- handlers. KBFIX2 constantly checks the keyboard buffer to deter-
- mine whether another program has changed it, and if so, it defers
- to that program, resets its own buffer and variables, and uses
- the current buffer condition as a starting point for further
- processing. KBFIX2 cannot, however, control what other programs
- do.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -- 8 --
-
-
-
-
-
- KBFIX2.COM VERSION 3.0 June 22, 1986
-
-
- CHANGES
-
- | V3.0 (05/31/86): Fixed bug which caused repeated beeping when a
- | key state was toggled by another program (i.e., not from the
- | keyboard).
-
- | Moved keyboard buffer to occupy the PSP after 5CH to save some
- | memory.
-
- | Changed '/b' parameter to take an optional ratio to vary the
- | pitch & duration of all beeps for faster machines (AT, etc.)
- | Ratio is expressed as /bn:n where 1:2 makes things half as fast,
- | 3:4 makes them 3/4 as fast, etc.
-
- | Exit code returned to system if dos 2.0 or above.
-
- | Option ('/k') to remove program from memory if vectors haven't
- | been modified.
-
- | V2.9 (05/13/86): Changed key state display to reverse colors it
- | finds on the screen when showing a locked state, and to update
- | the screen only when necessary. Also added check for graphic
- | mode -- key state display is now disabled in this mode.
-
- | V2.8 (04/26/86): Modified timer handler to use hardware timer
- | interrupt and do its work after calling the 'real' handler.
- | Since an EOI will have been sent to the 8259 at this point, it's
- | no longer necessary to set special mask mode to enable lower
- | priority interrupts, which should solve some reported
- | compatibility problems with Tallgrass hard disks.
-
- | V2.7 (03/06/86): Added option (/W0) to disable wait-for-retrace
- | on color display. Fixed Ctrl-Break problem causing slow
- | typematic until buffer had wrapped.
-
- | V2.6 (02/11/86): Added option (/F2) to turn off caps-lock the
- | first time an alpha key is pressed along with a shift key.
-
- | V2.5 (02/06/86): Fix AT reverse caps-lock shift problem.
-
- | V2.4 (08/13/85): Tied beep to timer handler -- if both enabled,
- | beep will sound whenever locking key status changes, even if
- | change not done through keyboard.
-
- **** LAST RELEASED VERSION ****
-
- V2.3 (6/18/85): Fixed bug which resulted in the scroll-lock key
- behaving like a typematic key.
-
-
- -- 9 --
-
-
-
-
-
- KBFIX2.COM VERSION 3.0 June 22, 1986
-
-
- V2.2 (3/31/85): Fixed bug in buffer logic which put the wrong
- character in the bios keyboard buffer when the extended buffer
- option was in effect, and characters were being typed slightly
- faster than they were removed from the buffer (thanks to Dave
- Rothman and Chris Dunford for reporting this).
-
- Changed format of current options display to be consistent with
- actual setting of command-line switches (thanks to Earle Robinson
- for the suggestion).
-
- Changed scroll-lock pause to release only when the scroll-lock
- key is pressed again. If the status display is active, a
- blinking S will display while the pause is in effect.
-
- V2.1 (3/18/85): Added scroll-lock pause feature ('s' option).
-
- V2.0 (3/16/85): Original version.
-
- Please direct all questions, suggestions and problem reports to:
-
- Skip Gilbrech
- 90 Lexington Ave. #10-G
- New York, NY 10016
- Compuserve: 71445,534 (messages left on IBMSW SIG preferred)
-
- This program is in the public domain. Anyone is welcome to use
- it and pass it along as they like. Contributions are definitely
- NOT solicited, but then again, I'm not about to return checks
- from grateful users...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -- 10 --
-